package com.cyzy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyzy.dto.OrderDriverDto;
import com.cyzy.dto.OrderDto;
import com.cyzy.dto.TripOrderDto;
import com.cyzy.pojo.TripOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper extends BaseMapper<TripOrder> {

    //查询接单司机信息
    TripOrderDto driverInformation(@Param("userId") long userId);
    //查询所有订单
    List<OrderDto> selectOrderList(@Param("driverId")Integer driverId,
                                   @Param("orderStatus")Integer orderStatus);

    List<OrderDto> selectPassengerOrderList(@Param("userId")Integer userId,
                                            @Param("orderStatus")Integer orderStatus,
                                            @Param("orderState")Integer orderState);

    List<OrderDto> selectPassengerOrderListStatusList(@Param("userId")Integer userId,
                                            @Param("orderStatusList")List<Integer> orderStatusList,
                                            @Param("orderState")Integer orderState);

    OrderDriverDto selecetOrderAndDriver(@Param("orderId") long orederId);
}
